package com.sgb.kjwl.di.packers;

import com.sgb.kjwl.repository.HomeRepertory;
import com.sgb.kjwl.repository.impl.HomeRepertoryImpl;
import com.sgb.kjwl.view.ui.fragment.packers.FindJobSearchFragment;
import com.sgb.kjwl.view.ui.fragment.packers.FindPackersSearchFragment;
import com.sgb.kjwl.view.ui.fragment.packers.FindWorkerSearchFragment;
import com.sgb.kjwl.view.ui.fragment.packers.PackersEmploymentSearchFragment;
import com.sgb.kjwl.view.ui.fragment.packers.PackersPeopleFragment;
import com.sgb.kjwl.view.ui.fragment.packers.PackersProjectTeamFragment;
import com.sgb.kjwl.view.ui.fragment.packers.PackersWorkTeamFragment;
import com.sgb.kjwl.view.ui.fragment.packers.PersonCommonFragment;
import com.sgb.kjwl.view.ui.fragment.packers.PersonIntroFragment;
import com.sgb.kjwl.view.ui.fragment.packers.QuotePriceSearchFragment;
import com.sgb.kjwl.viewmodel.packers.FragEmploymentSearchModel;
import com.sgb.kjwl.viewmodel.packers.FragFindJobSearchModel;
import com.sgb.kjwl.viewmodel.packers.FragFindPackersSearchModel;
import com.sgb.kjwl.viewmodel.packers.FragFindPeopleModel;
import com.sgb.kjwl.viewmodel.packers.FragFindWorkerSearchModel;
import com.sgb.kjwl.viewmodel.packers.FragPackersWorkTeamModel;
import com.sgb.kjwl.viewmodel.packers.FragQuotePriceSearchModel;
import com.sgb.kjwl.viewmodel.packers.ProjectTeamFragmentModel;
import com.sgb.kjwl.viewmodel.self.packers.PersonCommonModel;
import com.sgb.kjwl.viewmodel.self.packers.PersonIntroModel;
import com.swgk.core.base.di.Fragment;
import com.swgk.core.base.api.BaseApiSource;
import com.swgk.core.base.model.preference.BasePreferenceSource;

import dagger.Module;
import dagger.Provides;

@Module
public class PackersFragmentModule {

    private PackersProjectTeamFragment projectTeamFragment;
    private PersonIntroFragment personIntroFragment;
    private PersonCommonFragment personCommonFragment;
    private PackersPeopleFragment packersPeopleFragment;
    private PackersWorkTeamFragment packersWorkTeamFragment;
    private FindPackersSearchFragment findPackersSearchFragment;
    private QuotePriceSearchFragment quotePriceSearchFragment;
    private FindJobSearchFragment findJobSearchFragment;
    private PackersEmploymentSearchFragment packersEmploymentSearchFragment;
    private FindWorkerSearchFragment findWorkerSearchFragment;

    public PackersFragmentModule(FindWorkerSearchFragment findWorkerSearchFragment) {
        this.findWorkerSearchFragment = findWorkerSearchFragment;
    }

    public PackersFragmentModule(PackersEmploymentSearchFragment packersEmploymentSearchFragment) {
        this.packersEmploymentSearchFragment = packersEmploymentSearchFragment;
    }

    public PackersFragmentModule(FindJobSearchFragment findJobSearchFragment) {
        this.findJobSearchFragment = findJobSearchFragment;
    }

    public PackersFragmentModule(QuotePriceSearchFragment quotePriceSearchFragment) {
        this.quotePriceSearchFragment = quotePriceSearchFragment;
    }

    public PackersFragmentModule(FindPackersSearchFragment findPackersSearchFragment) {
        this.findPackersSearchFragment = findPackersSearchFragment;
    }

    public PackersFragmentModule(PackersWorkTeamFragment packersWorkTeamFragment) {
        this.packersWorkTeamFragment = packersWorkTeamFragment;
    }

    public PackersFragmentModule(PackersPeopleFragment packersPeopleFragment) {
        this.packersPeopleFragment = packersPeopleFragment;
    }

    public PackersFragmentModule(PersonCommonFragment personCommonFragment) {
        this.personCommonFragment = personCommonFragment;
    }

    public PackersFragmentModule(PersonIntroFragment personIntroFragment) {
        this.personIntroFragment = personIntroFragment;
    }

    public PackersFragmentModule(PackersProjectTeamFragment teamFragment) {
        this.projectTeamFragment = teamFragment;
    }

    @Provides
    @Fragment
    HomeRepertory provideHomeRepertory(BaseApiSource apiSource, BasePreferenceSource preferenceSource) {
        return new HomeRepertoryImpl(apiSource, preferenceSource);
    }

    @Provides
    @Fragment
    ProjectTeamFragmentModel provideHomeModel(HomeRepertory repertory) {
        return new ProjectTeamFragmentModel(projectTeamFragment, repertory);
    }

    @Provides
    @Fragment
    PersonIntroModel providePersonIntroModel(HomeRepertory repertory) {
        return new PersonIntroModel(personIntroFragment, repertory);
    }

    @Provides
    @Fragment
    PersonCommonModel providePersonCommonModel(HomeRepertory repertory) {
        return new PersonCommonModel(personCommonFragment, repertory);
    }

    @Provides
    @Fragment
    FragFindPeopleModel provideFragFindPeopleModel(HomeRepertory repertory) {
        return new FragFindPeopleModel(packersPeopleFragment, repertory);
    }

    @Provides
    @Fragment
    FragPackersWorkTeamModel provideFragPackersWorkTeamModel(HomeRepertory repertory) {
        return new FragPackersWorkTeamModel(packersWorkTeamFragment, repertory);
    }

    @Provides
    @Fragment
    FragFindPackersSearchModel provideFragFindPackersSearchModel(HomeRepertory repertory) {
        return new FragFindPackersSearchModel(findPackersSearchFragment, repertory);
    }

    @Provides
    @Fragment
    FragQuotePriceSearchModel provideFragQuotePriceSearchModel(HomeRepertory repertory) {
        return new FragQuotePriceSearchModel(quotePriceSearchFragment);
    }

    @Provides
    @Fragment
    FragFindJobSearchModel provideFragFindJobSearchModel(HomeRepertory repertory) {
        return new FragFindJobSearchModel(findJobSearchFragment, repertory);
    }

    @Provides
    @Fragment
    FragEmploymentSearchModel provideFragEmploymentSearchModel(HomeRepertory repertory) {
        return new FragEmploymentSearchModel(packersEmploymentSearchFragment);
    }

    @Provides
    @Fragment
    FragFindWorkerSearchModel provideFragFindWorkerSearchModel(HomeRepertory repertory) {
        return new FragFindWorkerSearchModel(findWorkerSearchFragment);
    }
}
